/**
  ******************************************************************************
  * @file    led.h
  * @author  LZJ
  * @version V0.0.1
  * @date    2025/10/11
  * @brief   Header for led.c module
  ******************************************************************************
  */

#ifndef _LED_H_
#define _LED_H_

#include "stm32f4xx.h"
#include "stm32f4xx_gpio.h"

#define LED0_GPIO   GPIOF
#define LED0_Pin    GPIO_Pin_9
#define LED1_GPIO   GPIOF
#define LED1_Pin    GPIO_Pin_10

#define LED0(x)     x?GPIO_SetBits(LED0_GPIO, LED0_Pin):GPIO_ResetBits(LED0_GPIO, LED0_Pin)
#define LED1(x)     x?GPIO_SetBits(LED1_GPIO, LED1_Pin):GPIO_ResetBits(LED1_GPIO, LED1_Pin)

#define LED0_TOGGLE GPIO_ToggleBits(LED0_GPIO, LED0_Pin)
#define LED1_TOGGLE GPIO_ToggleBits(LED1_GPIO, LED1_Pin)

#define LIGHT_ON    0
#define LIGHT_OFF   1
/* Function declaration ------------------------------------------------------------*/
void led_init(void);
#endif
